package hhh.app.domain.interactor;

import javax.inject.Inject;

import hhh.app.domain.repository.ProductRepository;
import rx.Observable;

/**
 * Created by Administrator on 2017/5/5 0005.
 */
public class GetProductImages extends ProductCase {
    private final ProductRepository productRepository;
    private int pid;

    @Inject
    public GetProductImages(ProductRepository productRepository) {
        this.productRepository = productRepository;
    }

    public GetProductImages setProductId(int id){
        pid=id;
        return this;
    }

    @Override
    protected Observable buildProductCaseSubscriber() {
        return productRepository.productImage(pid);
    }
}
